projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d1c5c6
)
Protect against zero-length completions
author
João Távora
<joaotavora@gmail.com>
Wed, 16 Oct 2019 22:13:09 +0000
(23:13 +0100)
committer
João Távora
<joaotavora@gmail.com>
Wed, 16 Oct 2019 22:13:09 +0000
(23:13 +0100)
Apparently the Vue Language Server sends such things (see https://github.com/joaotavora/eglot/issues/319).
* eglot.el (eglot-completion-at-point): Protect against
zero-length completions.
lisp/progmodes/eglot.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/eglot.el
b/lisp/progmodes/eglot.el
index aa64fe6a2a9d950af1462c7cdb8cc60c1039eaae..cba8c341b3479cd72f8dcbbdeb518e04b7410a01 100644
(file)
--- a/
lisp/progmodes/eglot.el
+++ b/
lisp/progmodes/eglot.el
@@
-1907,7
+1907,8
@@
is not active."
(string-trim-left label))
(t
(or insertText (string-trim-left label))))))
- (put-text-property 0 1 'eglot--lsp-item item proxy)
+ (unless (zerop (length proxy))
+ (put-text-property 0 1 'eglot--lsp-item item proxy))
proxy))
items))
(bounds